<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2020/5/3
 * Time: 15:12
 */
namespace app\common\model;

use think\Model;

class Agency extends Model
{
    public static function getAgency(){
        $map = [];
        if(session('admin_auth.group_id') != 1){
            $map['uid'] = session('admin_auth.admin_id');
        }
        return self::where($map)->field('id,name')->select();
    }
}